From 2501152842a99038851e6cc6cd469e6a4303f4d4 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 23 Feb 2019 16:52:23 -0500 Subject: [PATCH] ime: Stop using gdk_surface_get_user_data Use gtk_root_get_for_surface instead. --- gtk/gtkimcontextime.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gtk/gtkimcontextime.c b/gtk/gtkimcontextime.c index 62961eb3b3..e18795c89e 100644 --- a/gtk/gtkimcontextime.c +++ b/gtk/gtkimcontextime.c @@ -29,6 +29,7 @@ #include "gtkimcontextime.h" #include "gtkimmoduleprivate.h" +#include "gtkroot.h" #include "imm-extra.h" @@ -878,9 +879,9 @@ gtk_im_context_ime_set_preedit_font (GtkIMContext *context) if (!context_ime->client_surface) return; - gdk_surface_get_user_data (context_ime->client_surface, (gpointer) &widget); - if (!GTK_IS_WIDGET (widget)) - return; + widget = gtk_root_get_for_surface (context_ime->client_surface); + if (!widget) + return hwnd = gdk_win32_surface_get_impl_hwnd (context_ime->client_surface); himc = ImmGetContext (hwnd); -- 2.30.2